package com.shruijin.wy.aop.service.impl;

import com.shruijin.wy.aop.anno.AdviceAnno;
import com.shruijin.wy.aop.service.UserActionTest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class UserActionTestImpl implements UserActionTest {

    Logger LOGGER = LoggerFactory.getLogger(this.getClass());
    public String userName="King";

    @Override
    public void wakeup() {
        LOGGER.info(" {} 起床了!",userName);
    }

    @Override
    public void sleep() {
        LOGGER.info(" {} 睡觉了!",userName);
    }

    @Override
    public void eat() {
        LOGGER.info(" {} 吃饭了!",userName);
    }

    @Override
    @AdviceAnno
    public String say(String words) {
        LOGGER.info(" {} 说 ：{} ",userName,words);
        return words;
    }

    @Override
    public void drive() {
        LOGGER.info(" {} 在开车!",userName);
    }

    @Override
    public void walk() {
        LOGGER.info(" {} 在走路!",userName);
    }

    @Override
    public void read() {
        LOGGER.info(" {} 在阅读!",userName);
    }

    @Override
    @AdviceAnno
    public String call(String phone) {
        LOGGER.info(" {} 在打电话 {} !",userName,phone);
        return phone;
    }
}
